From: Richard M. Stallman Date: Sat, 5 Jun 1993 17:41:50 +0000 (+0000) Subject: (dired-flag-backup-files): Handle `*' made by `ls -F'. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95557 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=0102ea2d9549a59aa65bb53b3ba5206243145929;p=emacs.git (dired-flag-backup-files): Handle `*' made by `ls -F'. --- diff --git a/lisp/dired.el b/lisp/dired.el index 6dacbbd3db5..9d0fd907eea 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1735,7 +1735,16 @@ With prefix argument, unflag these files." ;; It is less than general to check for ~ here, ;; but it's the only way this runs fast enough. (and (save-excursion (end-of-line) - (eq (preceding-char) ?~)) + (or + (eq (preceding-char) ?~) + ;; Handle executables in case of -F option. + ;; We need not worry about the other kinds + ;; of markings that -F makes, since they won't + ;; appear on real backup files. + (if (eq (preceding-char) ?*) + (progn + (forward-char -1) + (eq (preceding-char) ?~))))) (not (looking-at dired-re-dir)) (let ((fn (dired-get-filename t t))) (if fn (backup-file-name-p fn))))